home *** CD-ROM | disk | FTP | other *** search
- @echo off
-
- rem C compiler:
- set CC=gcc
- set CCOBJ=gcc -c
-
- rem C compiler options:
- set CC_OPTIONS=-ansi -O2
-
- cls
- echo INSTALL SmallEiffel script for Windows NT/95
- echo.
-
- if "%SmallEiffel%~"=="~" goto help_smalleiffel
- if not exist %SmallEiffel% goto help_exist
- cd /d %SmallEiffel%
- if errorlevel 1 goto help_cd
- if not exist bin mkdir bin
- if not exist bin goto help_mkdir_bin
-
- cd bin
- echo "dummy" > dummy
- del /f /s /q .
-
- cd ..\sys
- if exist system.se del /f /q system.se
- if exist system.se goto help_del_system
- echo Windows > system.se
- if exist loadpath.Windows del /f /q loadpath.Windows
- echo .\> loadpath.Windows
- echo %SmallEiffel%\lib_std\>> loadpath.Windows
- echo %SmallEiffel%\lib_rand\>> loadpath.Windows
- echo %SmallEiffel%\lib_show\>> loadpath.Windows
- echo %SmallEiffel%\lib_test\>> loadpath.Windows
- rem Don't know how to avoid last CR with echo :-(
-
- cd ..\bin_c
- echo C compiling clean ...
- if exist clean.exe del /f /q clean.exe
- %CC% %CC_OPTIONS% clean.c -o clean.exe
- if not exist clean.exe goto help_cc_clean
- echo C compiling finder ...
- if exist finder.exe del /f /q finder.exe
- %CC% %CC_OPTIONS% finder.c -o finder.exe
- if not exist finder.exe goto help_cc_finder
- echo C compiling compile ...
- if exist compile.exe del /f /q compile.exe
- %CC% %CC_OPTIONS% compile.c -o compile.exe
- if not exist compile.exe goto help_cc_compile
-
- echo C compiling compile_to_c ...
- if exist compile_to_c.exe del /f /q compile_to_c.exe
- %CC% %CC_OPTIONS% compile_to_c.c -o compile_to_c.exe
- if exist compile_to_c.exe goto all_compiled
- REM do the version with splitted file
-
- :all_compiled
- echo Files successfully compiled; moving them to bin directory
- del /f /q ..\bin\*.exe
- copy *.exe ..\bin
- del /f /q *.exe
-
- cd ..\man
- ren *.hlp *.help
-
- goto end_success
-
- rem --------------------------------- help section
- :help_smalleiffel
- echo You must set environment variable "SmallEiffel" to
- echo the directory in which you want to install SmallEiffel.
- goto end_failure
-
- :help_exist
- echo Directory "%SmallEiffel%" does not exist.
- goto help_smalleiffel
- goto end_failure
-
- :help_cd
- echo Cannot access directory "%SmallEiffel%".
- goto help_smalleiffel
- goto end_failure
-
- :help_mkdir_bin
- echo Cannot create directory "%SmallEiffel%\bin".
- goto end_failure
-
- :help_del_system
- echo Cannot remove file "%SmallEiffel%\sys\system.se".
- goto end_failure
-
- :help_cc_clean
- echo Unable to C compile clean.c to clean.exe.
- echo C compiler: %CC% Options: %CC_OPTIONS%
- goto end_failure
-
- :help_cc_finder
- echo Unable to C compile finder.c to finder.exe.
- echo C compiler: %CC% Options: %CC_OPTIONS%
- goto end_failure
-
- :help_cc_compile
- echo Unable to C compile compile.c to compile.exe.
- echo C compiler: %CC% Options: %CC_OPTIONS%
- goto end_failure
-
- :end_success
- cd /d %SmallEiffel%
- echo SmallEiffel Install succeeded.
- goto end
-
- :end_failure
- echo SmallEiffel Install failed.
- goto end
-
- :end
- pause